<?php
$sidebar =
'<ul id=\"admin-nav\">
    <li><a href=\"' . site_url("admin/home") . '\">Admin kodu</a></li>
    <li><a href=\"' . site_url("admin/competitions") . '\">Võistlused</a></li>
    <li><a href=\"' . site_url("admin/competitions/manual") . '\">Käsitsi sisestamine</a></li>
    <li><a href=\"' . site_url("admin/tables") . '\">Aegade ja punktide tabelid</a></li>
</ul>';

$sidebar = str_replace("\n", '\n', $sidebar);
?> 

<?php echo validation_errors(); 
    if (isset($message) && strlen($message) > 0) {
        echo '<div class="alert alert-success">' . $message . '</div>';
    }
    
     if (isset($a_href) && strlen($a_href) > 0 && isset($a_text) && strlen($a_text) > 0) {
        echo '<div class="success"><a href="'.$a_href.'">'.$a_text.'</a></div>';
    }

?>
<?php echo form_open('competitions/add'); ?>

<link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'public/css/dateinput.css'; ?>"/>

<script>
    
    $(".page-header").html("<h1>Administraatori lehekülg</h1>");
    $(".sidebar").html("<?php echo $sidebar; ?>");
    
</script>
